import request from '@/utils/request'

// 获取对接系统配置分页列表
export function pagingDockingSystem(query) {
  return request({
    url: '/system/dockingSystemConfig/paging',
    method: 'get',
    params: query
  })
}
// 获取对接系统配置列表
export function getDockingSystemList(query) {
  return request({
    url: '/system/dockingSystemConfig/getDockingSystemList',
    method: 'get',
    params: query
  })
}

// 删除对接系统配置
export function deleteDockingSystem(configId) {
  if (!configId) {
    return false
  }
  return request({
    url: '/system/dockingSystemConfig/delete',
    method: 'get',
    params: {
      configId
    }
  })
}

// 获取对接系统配置
export function getDockingSystem(configId) {
  const params = {}
  if (configId) {
    params.configId = configId
  }
  return request({
    url: '/system/dockingSystemConfig/getDockingSystem',
    method: 'get',
    params: params
  })
}

// 保存对接系统配置，传复杂对象，参数用data
export function saveDockingSystem(dockingSystem) {
  return request({
    url: '/system/dockingSystemConfig/save',
    method: 'post',
    data: dockingSystem
  })
}
